package org.pixelami.twisted.internet.protocol
{
	public class ClientFactory extends Factory
	{
		public function ClientFactory()
		{
			super();
		}
		
		/*
		A Protocol factory for clients.

	    This can be used together with the various connectXXX methods in
	    reactors.
	    */
	
	    public function startedConnecting(connector:Object):void
	    {
	        /*
	        Called when a connection has been started.
	
	        You can call connector.stopConnecting() to stop the connection attempt.
	
	        @param connector: a Connector object.
	        */
	    }
	
	    public function clientConnectionFailed(connector:Object, reason:Object):void
	    {
	        /*
	        Called when a connection has failed to connect.
	
	        It may be useful to call connector.connect() - this will reconnect.
	
	        @type reason: L{twisted.python.failure.Failure}
	        */
	    }
	
	    public function clientConnectionLost(connector:Object, reason:Object, reconnecting:Boolean = false):void
	    {
	        /*
	        Called when an established connection is lost.
	
	        It may be useful to call connector.connect() - this will reconnect.
	
	        @type reason: L{twisted.python.failure.Failure}
	        */
	    }
		
	}
}